import Vue from 'vue'
import VueRouter from 'vue-router'

import Layout from "@/views/Layout"
import login from "../views/Login/login";

Vue.use(VueRouter)

export const routes = [
  {
    path: '/',
    name: 'index',
    component: Layout,
    meta:{
      title:"首页管理"
    },
    children:[{
      path: '/home',
      name: 'home',
      component:()=>import('@/views/home/home'),
      meta:{
        title:"首页",
        icon:"eleme"
      }
    }]
  },
  {
    path:"/login",
    name:"login",
    component: login,
    hidden:true
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
